<?php

#test.php

function blogger2_newPost($params) { 
	$separat = "</string></value></member>";
	$p1 = explode("<member><name>username</name><value><string>",$params);	
		$u = substr($p1[1], 0, strpos($p1[1],$separat));
	$p2 = explode("<member><name>password</name><value><string>",$params);	
		$p = substr($p2[1], 0, strpos($p2[1],$separat));		
	$p3 = explode("<member><name>title</name><value><string>",$params);	
		$t = substr($p3[1], 0, strpos($p3[1],$separat));		
	$p4 = explode("<member><name>body</name><value><string>",$params);	
		$b = substr($p4[1], 0, strpos($p4[1],$separat));
	echo "U: ".$u."<br />\nP: ".$p."<br />\nT: ".$t."<br />\nC: ".$b."<br />\n<br />\nString: ".htmlspecialchars($params);      
}


$f = file_get_contents("request.xml"); 
blogger2_newPost($f); 

?>